import com.google.jplurk.*

if (['wishes', 'hopes'].contains(plurk.qualifier)) {

	words = ['消音']
	
	words.each {
		word ->
		
		if (plurk.content.toLowerCase().contains(word)) {
			println "match ${word}"
			matched++
			//ship.response plurk.plurk_id, '又!我在這裡', Qualifier.WONDERS
			
			uid = ship.cache['profile'].uid
			responses = ship.client.responseGet("${plurk.plurk_id}").responses
			
			for (def i=0; i<responses.length(); i++) {
				r = responses.get(i)
				
				if (r.user_id.equals(uid)) {
					println "消音處理 ${r.plurk_id}/${r.id}"
					ship.client.responseDelete "${r.plurk_id}", "${r.id}"
				}
			}
			println "消音完成"
		}
	}

}
